package com.yinhd.study.designPatterns.chainOfResponsibility.process;

/**
 * @program: study
 * @description:
 * @Author: chengl
 * @create: 2022-01-26 11:09
 **/
public class Process {
    public static  Approver getProcess(){
        Approver articleApprover = new ArticleApprover();
        Approver videoApprover = new VideoApprover();
        articleApprover.setApprover(videoApprover);
        return articleApprover;
    }

    public static void main(String[] args) {
        Course course1 = new Course("java课程分享","热衷于技术分享","https://www.baidu,com");
        Course course2 = new Course("java课程分享",null,"https://www.baidu,com");
        Approver process1 = Process.getProcess();
        process1.deploy(course1);
        System.out.println("________________________________");
        process1.deploy(course2);
    }
}
